package cn.hnucm.service;

import cn.hnucm.bean.TbGoodsOrder;
import cn.hnucm.pojo.User;
import cn.hnucm.vo.Goods;

/**
 * @Author:liweihua
 * @Description:
 * @Date: 21:25$ 2021/12/28/028$
 * @Modified:
 */
public abstract class AbstractCenterControllerService extends CenterControllerService{

    //注入user
    public abstract void setUser();

    //注入商品
    public abstract void setGoods(Goods goods);

    //与数据库的支付密码进行匹配
    public abstract boolean matchPassword();

    //验证用户余额
    public abstract boolean verifyBalance();


    //更新商品
    public abstract boolean updateGoods();


    // 更新商品后再更新订单，如果更新订单出错就回滚更新商品
    public abstract boolean rollbackUpdateGoods();

    //更新订单数据
    public abstract TbGoodsOrder UpdateOrder();

    //回滚订单
    public abstract boolean rollbackUpdateOrder(int orderId);

    //更新用户的资金
    public abstract boolean updateUserBalance();

    //回滚用户的资金
    public abstract boolean rollbackUserBalance();


}
